/**
 * 定义站点地图模块
 */
(function(window, angular, undefined){
	var module = angular.module('water.apps.sw.bcSite.bcSiteManager', ['water.entity.bcSite']);
		
	module.controller('bcSiteManagerController',function($scope,$bcSiteService){

		$scope.systemType = [{k:'21',v:'地表水'},{k:'32',v:'污水'},{k:'22',v:'空气站'},{k:'31',v:'废气'}];
		$scope.model = {};
		$scope.siteCode;
		
		$scope.getModel = function(){
			$bcSiteService.getModel().then(function(data){
				if(data == null){
					return;
				}
				$scope.model = data[0];
			});
		}
		
		$scope.onSaveClick = function(model){
			$bcSiteService.saveModel(model).then(function(){
				alert("保存成功");
			});
		}
		
		$scope.getModel();
		
	});
	
}(window, angular));


